﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SharpMap.Presentation.Wpf;
using System.ComponentModel;
using System.Collections.ObjectModel;
using System.Windows;

namespace SharpMap.Wpf
{
    public class MapToolBarViewModel : INotifyPropertyChanged
    {
        public MapToolBarViewModel(FrameworkElement targetView)
        {
            _viewTools = new ObservableCollection<WpfMapTool>()
            {
                WpfMapTools.Pan
                ,WpfMapTools.ZoomMouse
                ,WpfMapTools.ZoomRectangle
                //,WpfMapTools.SelectMove
            };
        }

        public IEnumerable<WpfMapTool> ViewTools
        {
            get
            {
                return _viewTools;
            }
        }

        #region INotifyPropertyChanged Members

        public event PropertyChangedEventHandler PropertyChanged;

        void RaisePropertyChanged(string name)
        {
            PropertyChangedEventHandler handler = PropertyChanged;
            if (handler != null)
            {
                handler(this,new PropertyChangedEventArgs(name));
            }

        }
        #endregion


        //-----------------------------------------------------
        //
        //  fields
        //
        //-----------------------------------------------------

        #region fields
        ObservableCollection<WpfMapTool> _viewTools;
        #endregion //fields
    }
}
